package com.darrenchan.spark.sql

import org.apache.spark.sql.SparkSession

/**
  * SparkSession的使用
  */
object SparkSessionApp {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder().master("local[2]").appName("SparkSessionApp").getOrCreate()
//    val people = spark.read.json("people.json")
//
//    people.show()

    val listDF = spark.read.option("header", "true").csv("/Users/chenchi03/Desktop/whitelist.csv")
    listDF.show(100)

    spark.stop()
  }
}
